﻿using Microsoft.Extensions.DependencyInjection;
using HiCore.Extensions.DependencyInjection;

namespace HiCore.WebApi.Example.DomainEvents
{
    public static class _ServiceCollectionExtensions
    {
        public static IServiceCollection AddKafkaEventBus(this IServiceCollection services)
        {
            services.AddKafkaOption("aaa", options =>
            {
                options.BootstrapServers = new string[] { "10.10.10.232:9092", "10.10.10.233:9092", "10.10.10.234:9092" };
                options.SaslUsername = "hicoreDev";
                options.SaslPassword = "bx2SsRHtiU75B6Hb";
            });

            services.AddKafkaProducer("aaa");

            return services;
        }
    }
}
